package com.maywide.jdp.system.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.maywide.jdp.system.entities.BusinessFunction;

/**
 * 功能函数管理Service接口
 * 
 * @author luoyang
 * @version 1.0
 * @since JDK1.6
 */
public interface BusinessFunctionService extends LockedService {
	/**
	 * 新增功能函数
	 * 
	 * @param businessFunction
	 *            功能函数对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return BusinessFunction 新增后的对象
	 */
	public BusinessFunction insert(BusinessFunction businessFunction,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;

	/**
	 * 修改功能函数
	 * 
	 * @param businessFunction
	 *            功能函数对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return BusinessFunction 修改后的对象
	 */
	public BusinessFunction update(BusinessFunction businessFunction,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;

	/**
	 * 修改功能函数
	 * 
	 * @param businessFunction
	 *            功能函数对象
	 * @param appType 应用类型
	 * @param request
	 *            HttpServletRequest对象
	 * @return BusinessFunction 修改后的对象
	 */
	public BusinessFunction updateApp(BusinessFunction businessFunction,String appType,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;

	/**
	 * 读取功能函数
	 * 
	 * @param id
	 *            功能函数ID
	 * @param request
	 *            HttpServletRequest对象
	 * @return BusinessFunction 读取的功能函数对象
	 */
	public BusinessFunction load(String id, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * @param ids
	 *            移动的节点ID列表
	 * @param oldModID
	 *            移动的模块节点ID
	 * @param newModID
	 *            移动到的模块节点ID
	 */

	/**
	 * @param ids
	 *            移动的节点ID列表
	 * @param targetID
	 *            移动到的机功能节点ID
	 */
	public void move(List<String> ids, String targetID,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;
}
